(load-file "~/emacs/mypath/mathematica.el")
;; (add-hook 'mathematica-mode-hook 'turn-on-reftex)
;; (require 'math)
;; (autoload 'math "math" "Starts Mathematica" t)
;; (autoload 'math-mode "math")
;; (add-hook 'math-mode-hook
;; 	  '(lambda ()
;; 	     (define-key math-mode-map "\C-j" 'math-send-input)
;; 	     (define-key math-mode-map (kbd "\C-tab") 'math-complete-symbol)
;; 	     ))


;; (autoload 'mma-mode "mma.el" "Mathematica package file mode" t)
;; ;; (setq auto-mode-alist
;; (cons '("\\.m\\'" . mma-mode) auto-mode-alist))
(add-hook 'mathematica-mode-hook
          (lambda ()
	    (make-local-variable 'skeleton-pair-alist)
            (setq skeleton-pair t)
            (local-set-key (kbd "(") 'skeleton-pair-insert-maybe)
            (local-set-key (kbd "{") 'skeleton-pair-insert-maybe)
            (local-set-key (kbd "\"") 'skeleton-pair-insert-maybe)
            (local-set-key (kbd "[") 'skeleton-pair-insert-maybe)
	    (local-set-key (kbd "`") 'my-m-newline)
	    ))

(defun my-m-newline ()
  (interactive)
  (insert ";")
  (newline-and-indent)
  )

(provide 'math-setting)